package com.tj.collection.controller.admin.response;

import com.fqgj.common.api.ResponseData;
import com.tj.collection.bean.SystemConstants;

import java.util.ArrayList;
import java.util.List;

/**
 * Author: pavan
 * Date: 2020/7/20 上午10:25
 */
public class AdminAppListResponse implements ResponseData {

    private List<Item> appList;

    public AdminAppListResponse(String merchantCode) {
        this.appList = new ArrayList<>();
        //TODO 新增产品类目后需要修改
        if (SystemConstants.MEBOO.equals(merchantCode)) {
            this.appList.add(new Item("in.cashmama.app", "https://cashmama-oss-pro.cashmama.in/html/image/cashmama_icon.png", "5", "CashMama"));
        } else if (SystemConstants.DHANADHANV6.equals(merchantCode)) {
            this.appList.add(new Item("in.dhanadhan.loan.money.cash", "https://dhanadhan.oss-ap-south-1.aliyuncs.com/html/img/dhahanah_new.png", "38", "DhanaDhan"));
            this.appList.add(new Item("com.vayloan.app", "https://loanzone.oss-ap-south-1.aliyuncs.com/html/img/Logo.png", "38", "LoanZone"));
        } else if (SystemConstants.CASHZONE.equals(merchantCode)) {
            this.appList.add(new Item("in.cashzone.app", "https://lh3.googleusercontent.com/DDQth84IAfjbtmns2Aw_yObRqy_GSXriU-TOCCxhlT29s4rMQ52K9tCQcf96snuPIw=s360-rw", "39", "CashZone"));
        }
    }

    private class Item {
        /**
         * 包名
         */
        private String packageName;
        /**
         * 图标
         */
        private String iconUrl;

        private String appCode;

        private String appName;

        public Item(String packageName, String iconUrl, String appCode, String appName) {
            this.packageName = packageName;
            this.iconUrl = iconUrl;
            this.appCode = appCode;
            this.appName = appName;
        }

        public String getPackageName() {
            return packageName;
        }

        public Item setPackageName(String packageName) {
            this.packageName = packageName;
            return this;
        }

        public String getIconUrl() {
            return iconUrl;
        }

        public Item setIconUrl(String iconUrl) {
            this.iconUrl = iconUrl;
            return this;
        }

        public String getAppCode() {
            return appCode;
        }

        public Item setAppCode(String appCode) {
            this.appCode = appCode;
            return this;
        }

        public String getAppName() {
            return appName;
        }

        public Item setAppName(String appName) {
            this.appName = appName;
            return this;
        }
    }

}
